#ifndef PROJECTMODEL_H
#define PROJECTMODEL_H

#include "DataView_global.h"


namespace xvs {



class DATAVIEW_EXPORT ProjectModel : public QAbstractItemModel
{
    Q_OBJECT
public:
    ProjectModel();

    void SetProjectMgr(AbstractProjectMgr* mgr);

    XVObject *ObjFromIndex(QModelIndex index);

    QModelIndex IndexFromObj(XVObject* obj);

public:
    QModelIndex index(int row, int column, const QModelIndex &parent) const override;
    QModelIndex parent(const QModelIndex &child) const override;
    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
    int columnCount(const QModelIndex &parent = QModelIndex()) const override;
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;

private:
    AbstractProjectMgr* mProjectMgr;
};


}

#endif // PROJECTMODEL_H
